package com.infore.siteManagement.controller.ddic;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.infore.siteManagement.entity.StationClassify;
import com.infore.siteManagement.select.dto.QueryParamDto;
import com.infore.siteManagement.service.IStationClassifyService;
import com.infore.siteManagement.util.ResultEntity;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api(value = "站点类别管理接口", tags = {"站点类别管理接口" })
@RestController
@RequestMapping("/stationClassify")
public class StationClassifyController {
	
	@Autowired
	private IStationClassifyService iStationClassifyService;

	@ApiOperation(value = "查询所有站点类别接口")
	@ResponseBody
	@PostMapping(value = "/queryAll")
	public ResultEntity queryAll(@RequestBody(required = false) QueryParamDto queryParamDto) {
		return iStationClassifyService.query(queryParamDto);
	}
	
	@ApiOperation(value = "删除站点类别接口")
	@ResponseBody
	@DeleteMapping(value = "/delete")
	public ResultEntity delete(String ids) {
		return iStationClassifyService.delete(ids);
	}
	
	@ApiOperation(value = "编辑/新增设备通用接口")
	@ResponseBody
	@PostMapping(value = "/edit")
	public ResultEntity edit(@RequestBody StationClassify stationClassify) {
		return iStationClassifyService.edit(stationClassify);
	}
}
